$(document).ready ->
  $('.savecity').click (e)->
    upForm = $('#savecity')
    $.ajax
      url: upForm.attr('action')
      type: 'POST',
      data: upForm.serialize()
      success: (res)->
        show('保存成功！');
      error: (res)->
        show('保存失败！');

show= (msg)->
  alert(msg)